/*
 * Copyright 2013-2015 the original author or authors.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.xdtech.hotel.monitor;

import com.xdtech.hotel.util.HotelConstants;

/**
 * 
 * @author max.zheng
 * @create 2015-5-1下午10:20:08
 * @since 1.0
 * @see
 */
public class ComponentInfo {
	
	public ComponentInfo() {
		super();
	}
	public ComponentInfo(String type, String status) {
		super();
		this.type = type;
		this.status = status;
	}
	
	public ComponentInfo(String type, String status, String addr, String channel) {
		super();
		this.type = type;
		this.status = status;
		this.addr = addr;
		this.channel = channel;
	}

	private String type;
	private String status;
	protected String addr; // ” : “0”, #可选参数：0-255，设备地址；
	protected String channel; // ” : “0”, #可选参数：0-255,设备通道；
	
	private String freq;
	private String delay;
	/**
	 * 创建节点信息
	 * 
	 * @author max.zheng
	 * @create 2015-5-14下午8:34:07
	 * @modified by
	 * @param addr
	 * @param channel
	 * @param status
	 * @param freq
	 * @param delay
	 */
	public void createNode(String addr,String channel,String status,String freq,String delay) {
		this.type = HotelConstants.DEV_NODE_CONTROL;
		this.addr = addr;
		this.channel = channel;
		this.status = status;
		this.freq = freq;
		this.delay = delay;
	}
	
	private String value;
	/**
	 * 创建调光信息
	 * 
	 * @author max.zheng
	 * @create 2015-5-14下午8:33:49
	 * @modified by
	 * @param addr
	 * @param channel
	 * @param status
	 * @param freq
	 * @param delay
	 * @param value
	 */
	public void createDimmer(String addr,String channel,String status,String freq,String delay,String value) {
		this.type = HotelConstants.DEV_DIMMER_CONTROL;
		this.addr = addr;
		this.channel = channel;
		this.status = status;
		this.freq = freq;
		this.delay = delay;
		this.value = value;
	}
	
	private String power;
	private String mode;
	private String fan;
	private String temp;
	/**
	 * 创建空调信息
	 * 
	 * @author max.zheng
	 * @create 2015-5-14下午8:33:35
	 * @modified by
	 * @param addr
	 * @param channel
	 * @param power
	 * @param mode
	 * @param fan
	 * @param temp
	 */
	public void createAc(String addr,String channel,String power,String mode,String fan,String temp) {
		this.type = HotelConstants.DEV_AC_CONTROL;
		this.addr = addr;
		this.channel = channel;
		this.power = power;
		this.status = power;
		this.mode = mode;
		this.fan = fan;
		this.temp = temp;
	}
	
	private String volume;
	private String input;
	private String ch;
	
	/**
	 * 创建电视信息
	 * 
	 * @author max.zheng
	 * @create 2015-5-14下午8:33:18
	 * @modified by
	 * @param addr
	 * @param channel
	 * @param power
	 * @param volume
	 * @param input
	 * @param ch
	 */
	public void createTv(String addr,String channel,String power,String volume,String input,String ch) {
		this.type = HotelConstants.DEV_TV_CONTROL;
		this.addr = addr;
		this.channel = channel;
		this.power = power;
		this.status = power;
		this.volume = volume;
		this.input = input;
		this.ch = ch;
	}
	/**
	 * 创建音乐
	 * 
	 * @author max.zheng
	 * @create 2015-5-14下午8:33:08
	 * @modified by
	 * @param addr
	 * @param channel
	 * @param power
	 * @param volume
	 * @param input
	 * @param ch
	 */
	public void createMusic(String addr,String channel,String power,String volume,String input,String ch) {
		this.type = HotelConstants.DEV_MUSIC_CONTROL;
		this.addr = addr;
		this.channel = channel;
		this.power = power;
		this.status = power;
		this.volume = volume;
		this.input = input;
		this.ch = ch;
	}
	
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getAddr() {
		return addr;
	}
	public void setAddr(String addr) {
		this.addr = addr;
	}
	public String getChannel() {
		return channel;
	}
	public void setChannel(String channel) {
		this.channel = channel;
	}
	public String getFreq() {
		return freq;
	}
	public void setFreq(String freq) {
		this.freq = freq;
	}
	public String getDelay() {
		return delay;
	}
	public void setDelay(String delay) {
		this.delay = delay;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getPower() {
		return power;
	}
	public void setPower(String power) {
		this.power = power;
		this.status = power;
	}
	public String getMode() {
		return mode;
	}
	public void setMode(String mode) {
		this.mode = mode;
	}
	public String getFan() {
		return fan;
	}
	public void setFan(String fan) {
		this.fan = fan;
	}
	public String getTemp() {
		return temp;
	}
	public void setTemp(String temp) {
		this.temp = temp;
	}
	public String getVolume() {
		return volume;
	}
	public void setVolume(String volume) {
		this.volume = volume;
	}
	public String getInput() {
		return input;
	}
	public void setInput(String input) {
		this.input = input;
	}
	public String getCh() {
		return ch;
	}
	public void setCh(String ch) {
		this.ch = ch;
	}
	
	
}
